package com.study.common.collections;

import org.junit.jupiter.api.Test;
import org.springframework.util.CollectionUtils;

import java.util.List;

/**
 * @author study
 * @version 1.0
 * @date 2020/6/27 19:28
 */
public class Demo {
    @Test
    public void listIsEmpty() {
        List<String> list = null;
        // System.out.println(list.isEmpty());//为空为报错
        if (CollectionUtils.isEmpty(list)) {
            System.out.println("为空");
        }
    }
}
